function getList(list,key){
	var newList=[];
	for(var i=0;i<list.length;i++){
		newList.push(list[i][key])
	}
	return newList;
}

function formatToNum(str){
	return parseFloat(str); 	
}


function ajaxRequestPromise(url){
	return new Promise(function(resolve, reject) {
		$.ajax({
			type:"get",
			url:url,
			async:true,
			success:function(data){
				var dataJson;
				if(typeof data=="object"){
					dataJson=data;
				}else if(typeof data == "string"){
					data=data.replace(/,\s*]/g,']');
					dataJson=JSON.parse(data);
				}
				
				resolve(dataJson) ;
				//callbackMethodReference(dataJson);
			}
		});
	});
}

$(function(){
    Resize = function(){
        var wwww = $(window).width(),
            hhhh = $(window).height();
        $("body").css({
            "width":wwww,
            "height":hhhh,
            "overflow":"hidden"
        });
        if(wwww<=1000){
            $("body").css({
                "overflow":"auto"
            });
        }     
    };
});
